import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';

import { TabsPage } from './tabs.page';
import { HomePage } from '../home/home.page';
import { NewsdynamicPage } from '../newsdynamic/newsdynamic.page';
import { PostmessagePage } from '../postmessage/postmessage.page';
import { InstantmessagePage } from '../instantmessage/instantmessage.page';
import { MinePage } from '../mine/mine.page';
const routes: Routes = [
  {
    path: 'tabs',
    component: TabsPage,
    children: [
      {
        path: '',
        redirectTo: '/tabs/(tab1:tab1)',
        pathMatch: 'full',
      },
      {
        path: 'tab1',
        outlet: 'tab1',
        component: HomePage
      },
      {
        path: 'tab2',
        outlet: 'tab2',
        component: InstantmessagePage
      },
      {
        path: 'tab3',
        outlet: 'tab3',
        component: PostmessagePage
      },
      {
        path: 'tab4',
        outlet: 'tab4',
        component: MinePage
      }
    ]
  },
  {
    path: '',
    redirectTo: '/tabs/(tab1:tab1)',
    pathMatch: 'full'
  }
];

@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class TabsPageRoutingModule { }
